In general, the volume of video data is huge. For this reason, an apparatus that handles video data usually compresses video data by encoding the video data, when transmitting the video data to a different apparatus, or when storing the video data in a storage. Typical video coding schemes that are widely used are Moving Picture Experts Group phase 2 (MPEG-2), MPEG-4, and H.264 MPEG-4 Advanced Video Coding (H.264 MPEG-4 AVC) standardized by the International Standardization Organization/International Electrotechnical Commission (ISO/IEC).
In these coding schemes, inter-coding is employed in which a coding-target picture is encoded by using information on the coding-target picture and a preceding and/or subsequent picture of the coding-target picture. In inter-coding, a coding-target picture is divided into multiple blocks. Then, for each block, a region of a reference picture, the region being most similar to the block, is identified as a predictive block by block matching, to compensate the motion between the reference picture and a coding-target picture, the reference picture being obtained by decoding an encoded picture preceding and/or subsequent to the coding-target picture. Thereafter, the amount of spatial movement between the predictive block and the coding-target block is calculated, and thus a motion vector is obtained. By using the motion vector, the predictive block is identified in the reference picture, and information on the difference between the predictive block and the coding-target block, and the motion vector, are encoded. Hence, using the inter-coding makes it possible to exclude redundant information, and therefore generally achieves higher compression efficiency than that achieved by intra-coding, in which a coding-target picture is encoded by using information included in the coding-target picture only.
To improve accuracy in motion compensation, methods of compensating for motion by using multiple motion vectors calculated on the basis of a coding-target picture and multiple reference pictures have been developed (for example, refer to Japanese Laid-open Patent Publication No. H09-139948).
In these methods, a motion vector is generated for each block. In particular, for a bidirectional predictive picture, for which predictive blocks are generated by using two or more reference pictures, multiple prediction directions are set for a coding-target block. Moreover, a motion vector is calculated for each prediction direction. To further improve compression efficiency, it is preferable that the amount of information to be used for encoding each motion vector be reduced. In view of this, in the High Efficiency Video Coding (HEVC) under development by the ISO/IEC and the International Telecommunication Union, Telecommunication Standardization Sector (ITU-T), a predictive vector is selected for each prediction direction for a coding-target block, from among motion vectors of the respective blocks encoded before the coding-target block. Then, for each prediction direction, a difference vector and information for identifying the predictive vector are variable-length encoded, the difference vector representing, for each element, the value of the difference between the motion vector and the predictive vector, (for example, refer to B. Bross et al., “High Efficiency Video Coding (HEVC) text specification draft 8”, [online], July 2012, Internet URL: http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=6465 (retrieved on Nov. 27, 2012)).